/*
 * JVM_StatusCodes.h
 *
 *  Created on: 10.12.2010
 *      Author: Tavin
 */
#include <stdint.h>

#ifndef JVM_STATUSCODES_H_
#define JVM_STATUSCODES_H_

typedef uint16_t JVM_StatusCode;

#endif /* JVM_STATUSCODES_H_ */


#define STCD_OK							0
#define STCD_THREAD_SLEEP				100
#define STCD_THREAD_WAIT				101
#define STCD_THREAD_EXIT				102
#define STCD_THREAD_DESTROY     103 // error returned by JVM_Opcode_execute()

#define STCD_BAD_CLASS_FILE				-100

#define STCD_WRONG_UTF8_FORMAT			-700

#define STCD_CODE_SIZE_OVERFLOW			-800


#define STCD_OUT_OF_MEMORY				-900
#define STCD_HANDLE_POOL_OVERFLOW		-1000

#define STCD_HEAP_OVERFLOW				-1100

#define STCD_THREAD_NOT_IN_LIST			-1200

#define STCD_MISSING_FIELD_REFERENCE	-1300
#define STCD_UNKNOWN_FIELD_TYPE			-1301

#define STCD_UNKNOWN_ARRAY_TYPE			-1400
#define STCD_NEGATIVE_ARRAY_SIZE		-1401

#define STCD_ILLEGAL_COMAND				-1500
#define STCD_ILLEGAL_WIDE_COMAND		-1501


// NEW STATUS CODES
#define STCD_EXCEPTION				       1600
#define STCD_NULL_REFERENCE				   1601
#define STCD_ARITHMETIC_EXCEPTION	   1602
#define STCD_OUT_OF_BOUNDS_EXCEPTION 1603
